package com.sc.pojo;

import java.io.Serializable;
import java.util.Date;

public class Postcomments implements Serializable {
    private Integer id;

    private Integer postid;

    private String content;

    private Date time;

    private Integer commenterid;

    private Integer support;

    //关联用户
    private User user;

    //关联帖子
    private Post post;

    private static final long serialVersionUID = 1L;

    public Post getPost() {
        return post;
    }

    public void setPost(Post post) {
        this.post = post;
    }

    public User getUser() {
        return user;
    }

    public void setUser(User user) {
        this.user = user;
    }

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public Integer getPostid() {
        return postid;
    }

    public void setPostid(Integer postid) {
        this.postid = postid;
    }

    public String getContent() {
        return content;
    }

    public void setContent(String content) {
        this.content = content == null ? null : content.trim();
    }

    public Date getTime() {
        return time;
    }

    public void setTime(Date time) {
        this.time = time;
    }

    public Integer getCommenterid() {
        return commenterid;
    }

    public void setCommenterid(Integer commenterid) {
        this.commenterid = commenterid;
    }

    public Integer getSupport() {
        return support;
    }

    public void setSupport(Integer support) {
        this.support = support;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", id=").append(id);
        sb.append(", postid=").append(postid);
        sb.append(", content=").append(content);
        sb.append(", time=").append(time);
        sb.append(", commenterid=").append(commenterid);
        sb.append(", support=").append(support);
        sb.append("]");
        return sb.toString();
    }
}